/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package action;

import BUSServices.QLNSBUSWebService;
import BUSServices.QLNSBUSWebService_Service;
import BUSServices.Sach;
import com.opensymphony.xwork2.ActionSupport;

import java.util.List;

/**
 *
 * @author USER
 */
public class TrangChuAction extends ActionSupport{
    
    QLNSBUSWebService_Service service;
    QLNSBUSWebService port;
    
    
    private List<Sach> listSachMoi;
    private List<Sach> listSachHot;
    
    public TrangChuAction(){
        service = new QLNSBUSWebService_Service();
        port = service.getQLNSBUSWebServicePort();
    }

    public List<Sach> getListSachMoi() {
        return listSachMoi;
    }

    public List<Sach> getListSachHot() {
        return listSachHot;
    }
    
    

   public String execute(){
       listSachHot = port.layDanhSachSachBanChayNhat();
       listSachMoi = port.layDanhSachSachMoiNhat();
       return SUCCESS;
   }
    
}
